package com.icloud.common.database.enums;


import lombok.Getter;

/**
 * 红包状态
 */
@Getter
public enum RedPacketHandleStateEnum {

    UNHANDLED("UNHANDLED","未领取"),

    HANDLED("HANDLED","已领取"),

    EXPIRE("EXPIRE","已过期"),
    ;

    private final String code;
    private final String cn;

    RedPacketHandleStateEnum(String code, String cn) {
        this.code = code;
        this.cn = cn;
    }

    public static boolean isUnhandled(String code){
        return UNHANDLED.code.equalsIgnoreCase(code);
    }
    public static boolean isHandled(String code){
        return HANDLED.code.equalsIgnoreCase(code);
    }
    public static boolean isExpire(String code){
        return EXPIRE.code.equalsIgnoreCase(code);
    }
}
